package cn.bgs.pojo;

import cn.bgs.pageUtil.PageRequest;
import cn.bgs.vo.CommunityVo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 楼栋表
 * </p>
 *
 * @author cf
 * @since 2022-06-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Building对象", description="楼栋表")
public class Building implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "楼栋id")
    @TableId(value = "building_id", type = IdType.AUTO)
    private Integer buildingId;

    @ApiModelProperty(value = "小区id")
    private Integer communityId;

    @ApiModelProperty(value = "楼栋")
    private Integer howMany;
    @DateTimeFormat(pattern = "yyyy-MM-dd ")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "建成日期")
    private LocalDateTime builtTime;

    @ApiModelProperty(value = "房屋用途（普通住宅、商业用地、商住两用）")
    private String houseUse;

    @ApiModelProperty(value = "备注")
    private String remark;

    @DateTimeFormat(pattern = "yyyy-MM-dd ")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd ")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "删除标识（y是删除 n是未删除）")
    private String deleteFlag;

    @ApiModelProperty("总楼层")
    private String totalFloor;

    @ApiModelProperty("中间表")
    @TableField(value = "false")
    private List<CellIntermediate> cellIntermediates;
    @ApiModelProperty("小区表")
    @TableField(value = "false")
    private List<CommunityVo> communityVos;

    @TableField(value = "false")
    private PageRequest pageRequest;

}
